package com.yunchang.springboot.mapper.mwsreport;

import com.yunchang.springboot.models.mwsreportbean.MwsRemovalShipmentDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MwsRemovalShipmentDetailMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MwsRemovalShipmentDetail record);

    int insertSelective(MwsRemovalShipmentDetail record);

    MwsRemovalShipmentDetail selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MwsRemovalShipmentDetail record);

    int updateByPrimaryKey(MwsRemovalShipmentDetail record);

    String getLatestDay(@Param("sellerId") String sellerId, @Param("area") String area);

    /**
     * 根据createTime获取对应的数据
     * @param time
     * @return
     */
    List<MwsRemovalShipmentDetail> selectByCreateTime(String time);

    /**
     * 根据是否生成财务数据获取对应的数据，limitValue用于指定获取数据的大小
     * @param financeStatus
     * @param limitValue
     * @param date
     * @return
     */
    List<MwsRemovalShipmentDetail> selectByFinanceStatus(@Param("financeStatus") Integer financeStatus,@Param("limitValue") Integer limitValue,@Param("date") String date);

    /**
     * 根据mwsRemovalShipmentDetailList对象集合更新financeStatus
     * @param mwsRemovalShipmentDetailList
     * @return
     */
    int updateFinanceStatusByMwsRemovalShipmentDetailList(@Param("mwsRemovalShipmentDetailList") List<MwsRemovalShipmentDetail> mwsRemovalShipmentDetailList);

    /**
     * 根据MwsRemovalShipmentDetail属性：shipmentDate、orderId、sku、disposition、trackingNumber、sellerId、area、fnSku获取对象
     * @param MwsRemovalShipmentDetail
     * @return
     */
    MwsRemovalShipmentDetail selectByMwsRemovalShipmentDetailAttribute(MwsRemovalShipmentDetail MwsRemovalShipmentDetail);
}